<template>
  <el-table
      :data="dataList"
      border
      stripe
      height="calc(100vh - 260px)"
      @row-click="selectOneRow"
  >
    <slot/>
  </el-table>
</template>

<script setup>
import {computed, defineProps} from 'vue'
const props = defineProps(['modelValue'])
const emits = defineEmits(['update:modelValue', 'selectRow'])
const dataList = computed({
  get(){
    return props.modelValue
  },
  set(value){
    emits('update:modelValue', value)
  }
})

const selectOneRow= function (row){
  emits('selectRow', row)
}
</script>

<style scoped>

</style>